<template>
  <el-select v-model="value" placeholder="请选择" class="wfull">
    <el-option v-for="i in 50" :key="i" :label="i" :value="i"/>
  </el-select>
</template>
<script setup lang="ts">
  import { ElSelect, ElOption } from 'element-plus';
  import { ref, watch } from 'vue';

  const props = defineProps<{modelValue?: number}>()
  const emits = defineEmits(['update:modelValue'])

  const value = ref<number>(props.modelValue)

  watch(value, () => emits('update:modelValue', value.value))
  watch(() => props.modelValue, (val) => value.value = val)
  
</script>